package com.frxuexi.shop

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.frxuexi.lib_base.GlideUtil
import com.frxuexi.lib_base.entity.ProductBeanItem
import com.frxuexi.shop.databinding.ActivityShopDetailBinding

@Route(path = "/shop/ShopDetailActivity")
class ShopDetailActivity : AppCompatActivity() {

    @Autowired
    lateinit var shop:ProductBeanItem
    lateinit var binding:ActivityShopDetailBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding=ActivityShopDetailBinding.inflate(layoutInflater)
        setContentView(binding.root)
        ARouter.getInstance().inject(this)

        binding.shopBack.setOnClickListener {
            finish()
        }

        binding.shopTitle.setText(shop.storeName)
        binding.shopPrice.setText("${shop.price}元")
        GlideUtil.loadImg(shop.image,binding.shopIv)


    }
}